package top.yqingyu.trans$client.cs.command.impl;

import top.yqingyu.qymsg.QyMsg;
import top.yqingyu.trans$client.cs.command.Command;
import top.yqingyu.trans$client.main.TransClient;


/**
 * @author YYJ
 * @version 1.0.0
 * @ClassName top.yqingyu.transclient.cs.command.impl.Quit
 * @description
 * @createTime 2022年07月24日 14:02:00
 */
public class Quit extends Command {

    private static final String commandRegx = "^(quit|exit|bye).*$";


    /**
     * socketChannel.register(selector, SelectionKey.OP_WRITE);
     * <p>
     * socketChannel.register(selector, SelectionKey.OP_READ);
     * description: 命令处理方法
     *
     * @param msg
     * @author yqingyu
     * DATE 2022/4/24
     */
    @Override
    public void deal(QyMsg msg, TransClient client) throws Exception {
        Thread.sleep(10);
        if (!"API".equals(System.getProperty(client.clientConf.CLIENT_USER_ID)))
            System.exit(1);
    }
}
